import request from "@/utils/requset.js";
export const apis = {
  traceUrl: (id) => {  // 查询货品追溯URL
    return request({
      url: `/yqyp/api/merchandise/traceUrl/${id}`,
      method: "get", 
      flag: 'yqyp'
    });
  },
  carSign: (data) => { // 车辆出入登记
    return request({
      url: "/yqyp/api/car/addCarInout",  // /yqyp/api/trace/car/sign
      method: "post",
      data: data, 
      flag: 'yqyp'
    });
  },
  sendBusinessAdd: (data) => { // 新增发货信息
    return request({
      url: "/yqyp/api/trace/send/business/save",
      method: "post",
      data: data, 
      flag: 'yqyp'
    });
  },
  receiveBusinessAdd: (data) => { // 新增收货信息
    return request({
      url: "/yqyp/api/trace/receive/business/save",
      method: "post",
      data: data, 
      flag: 'yqyp'
    });
  },
  query: (data) => {  // 出入库列表
    return request({
      url: `/yqyp/api/storage/inout/list`,
      method: "get", 
      data: data, 
      flag: 'yqyp'
    });
  },
  inoutDetail: (data) => {  // 出入库详情
    return request({
      url: `/yqyp/api/storage/inout/detail`,
      method: "get",
      data: data, 
      flag: 'yqyp'
    });
  },
  carNumList: (data) => {  // 根据加密车牌，查询匹配车牌号
    return request({
      url: `/yqyp/api/car/info/byTransportCode`,  // /yqyp/api/trace/carNum/list
      method: "get",
      data: data, 
      flag: 'yqyp'
    });
  },
  sendBusinessInfo: (data) => {  // 根据车牌号查询货品信息
    return request({
      url: `/yqyp/api/trace/send/business/info`,
      method: "get",
      data: data, 
      flag: 'yqyp'
    });
  },
  enterpriseList: () => {  // 收货企业
    return request({
      url: `/yqyp/api/enterprise/list`,
      method: "get",
      flag: 'yqyp'
    });
  },
  purposeAll: () => {  // 收货用途
    return request({
      url: `/yqyp/api/trace/receive/purpose/all`,
      method: "get", 
      flag: 'yqyp'
    });
  },
  toSend: (data) => {  // 发货
    return request({
      url: `/yqyp/api/trace/back/toSend`,
      method: "post",
      data, 
      flag: 'yqyp'
    });
  },
  toReceive: (data) => {  // 收货
    return request({
      url: `/yqyp/api/trace/back/toReceive`,
      method: "post",
      data, 
      flag: 'yqyp'
    });
  },
  byTraceUrl: (data) => {  // 收货扫码-追溯码url查询货品详情
    return request({
      url: `/yqyp/api/merchandise/info/byTraceUrl`,
      method: "post",
      data, 
      flag: 'yqyp'
    });
  },
  merchandiseInfoId: (id) => {  // 收货输入-根据追溯码查询货品详情
    return request({
      url: `/yqyp/api/merchandise/info/${id}`,
      method: "get", 
      flag: 'yqyp'
    });
  },
  byTraceUrlCode: (data) => {  // 输入追溯码，查货单信息,退货发货用
    return request({
      url: `/yqyp/api/trace/business/info/byTraceUrlCode`,
      method: "post",
      data, 
      flag: 'yqyp'
    });
  },
  traceUrlCodes: (data) => {  // 查询匹配的追溯码登记号 - 模糊查询不需要了
    return request({
      url: `/yqyp/api/trace/match/traceUrlCodes`,
      method: "post",
      data, 
      flag: 'yqyp'
    });
  },
  traceToTank: (data) => {  // 退货收货提交成功后 - 入库
    return request({
      url: `/yqyp/api/trace/back/toTank`,
      method: "post",
      data, 
      flag: 'yqyp'
    });
  },
  addCarInout: (data) => {  // 车辆出入保存
    return request({
      url: `/yqyp/api/car/addCarInout`,
      method: "post",
      data, 
      flag: 'yqyp'
    });
  },
  getCarType: (data) => {  // 车辆性质字典
    return request({
      url: `/trace/yiqiDict/getCarType`,
      method: "get",
      data, 
      flag: 'yqyp'
    });
  },
  tankGroupList: (data) => {  // 储罐罐组列表
    return request({
      url: `/yqyp/api/tank/tankGroup/list`,
      method: "get",
      data, 
      flag: 'yqyp'
    });
  },
  tankGroupNo: (tankGroupNo) => {  // 储罐号
    return request({
      url: `/yqyp/api/tank/list/byTankGroupNo/${tankGroupNo}`,
      method: "get", 
      flag: 'yqyp'
    });
  },
  print: (unloadIds) => {  // 打印
    return request({
      url: `/yqyp/api/trace/print/${unloadIds}`,
      method: "get", 
      flag: 'yqyp'
    });
  }
};